import { Injectable } from '@angular/core';
import { HttpClient } from '../../../../providers/httpClient';
import { Config } from '../../../../providers/config';

@Injectable()
export class IrpPositionListService {
	constructor(
		public httpClient: HttpClient,
		public config: Config
		) { }
  getPositionDataList(l_operator_no,vc_fund_code) {
    let postBody = {
      "module": "KSB",
      "method": "TRA_A02_0120",
      format: "json",
      "params": {
        'L_OPERATOR_NO':l_operator_no,
        'vc_fund_code':vc_fund_code
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: true
    });
  }
	getFundAssetsData(l_operator_no,vc_fund_code) {
		let postBody = {
			"module": "KSB",
			"method": "TRA_A02_0110",
      format: "json",
			"params": {
        'l_operator_No':l_operator_no,
        'vc_fund_code':vc_fund_code
			}
		};
		return this.httpClient.post(postBody, {
			isShowLoading: false
		});
	}
  getO32Code(vc_user) {
    let postBody = {
      "module": "KSB",
      "method": "TRA_A02_0050",
      format: "json",
      "params": {
        'vc_user':vc_user,
        'c_jyzl':''
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

}
